package com.itheima.service.impl;

import com.itheima.dao.Repository.CollectInfoRepository;
import com.itheima.model.domain.CollectInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectInfoService {

    @Autowired
    private CollectInfoRepository colsComRepository;

    public CollectInfo save(CollectInfo collectInfo){
        return colsComRepository.save(collectInfo);
    }
    public List<CollectInfo> findAllNewsBytel(String user_tel){
        System.out.println("user_tel is"+ user_tel);
        return colsComRepository.findAllNewsBytel(user_tel);
    }
    public List<CollectInfo> findAll(){
        return colsComRepository.findAll();
    }
}
